package com.hw.dagl.model;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
@Entity
@Table(name = "SYS_MENU", schema = "HWBIGDATA")
public class Sys_Menu implements java.io.Serializable{
	
	private static final long serialVersionUID = 5228272301585644008L;
	
	private String mid;//	VARCHAR2(20)	N			菜单ID 
	private String mname;//	VARCHAR2(50)	N			菜单名称
	private String parentid;// VARCHAR2(20)	N	0		上级菜单ID,顶级菜单�?
	private String icon;//	VARCHAR2(20)	Y			菜单图标
	private String url;//	VARCHAR2(200)	Y			菜单地址
	private String opentype;//	CHAR(1)	Y			菜单打开方式 0:默认 1:新窗体打�?
	private int cdpx;//	NUMBER	Y			菜单排序
	private String operation;
	
	
	public String getOperation() {
		return operation;
	}
	public void setOperation(String operation) {
		this.operation = operation;
	}
	private List<Sys_Menu> Child=null;
	
	@Id
	@Column(name = "MID", unique = true, nullable = false, length = 20)
	public String getMid() {
		return mid;
	}
	public void setMid(String mid) {
		this.mid = mid;
	}
	@Column(name = "MNAME", nullable = false, length = 50)
	public String getMname() {
		return mname;
	}
	public void setMname(String mname) {
		this.mname = mname;
	}
	@Column(name = "PARENTID", nullable = false, length = 20)
	public String getParentid() {
		return parentid;
	}
	public void setParentid(String parentid) {
		this.parentid = parentid;
	}
	@Column(name = "ICON", length = 20)
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	@Column(name = "URL", length = 200)
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	@Column(name = "OPENTYPE", length = 1)
	public String getOpentype() {
		return opentype;
	}
	public void setOpentype(String opentype) {
		this.opentype = opentype;
	}
	@Column(name = "CDPX", precision = 22, scale = 0)
	public int getCdpx() {
		return cdpx;
	}
	public void setCdpx(int cdpx) {
		this.cdpx = cdpx;
	}
	
	@Transient
	public List<Sys_Menu> getChild() {
		return Child;
	}
	public void setChild(List<Sys_Menu> child) {
		Child = child;
	}
	
	@Transient
	public String getId() {
		return this.mid;
	}
	@Transient
	public String getText(){
		return this.mname;
	}
	@Transient
	public List<Sys_Menu> getChildren() {
		return this.Child;
	}
	
	public Sys_Menu(String mid, String mname, String parentid,
			List<Sys_Menu> child) {
		super();
		this.mid = mid;
		this.mname = mname;
		this.parentid = parentid;
		Child = child;
	}
	public Sys_Menu() {
		super();
		// TODO 自动生成的构造函数存�?
	}
	
}
